package com.zty.xiaomi.server.Controller;


import com.zty.xiaomi.server.Service.Advice.AdviceService;
import com.zty.xiaomi.server.Vo.ResponseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 意见表 前端控制器
 * </p>
 *
 * @author losca
 * @since 2022-02-14
 */
@CrossOrigin
@RestController
@RequestMapping("/advice")
public class AdviceController {
    @Autowired
    AdviceService adviceService;
    @PostMapping("/save")
    public ResponseVO<Boolean> save(String username, String text,String title,String email){
        return ResponseVO.success(adviceService.save(username, text,title,email));
    }


}
